/**
 * Copyright 2009 by Christian Scheid. This file is part of the switch eclipse plugin and is licensed under the
 * GPL version 3. Please refer to the URL http://www.gnu.org/licenses/gpl-3.0.html for details.
 */
package org.digitalsoul.switchplugin.prefs;

import org.digitalsoul.switchplugin.prefs.util.HelpTexts;
import org.digitalsoul.switchplugin.prefs.util.ItemListConfigurator;

import org.digitalsoul.switchplugin.prefs.wizards.MatcherWizard;

import org.eclipse.jface.wizard.IWizard;



public class MatcherListUI extends CriteriaListUI {

    public MatcherListUI(ItemListConfigurator configurator) {
        super(configurator);
    }

    @Override
    protected String getHeader() {
        return "Matchers";
    }

    @Override
    protected String getHelpText() {
        return HelpTexts.getMatcherHelp();
    }

    @Override
    protected String[] getListItems() {
        return configurator.getConfiguredMatcherDescriptions();
    }

    @Override
    protected IWizard getWizard() {
        return new MatcherWizard(configurator, this);
    }

    @Override
    protected void removeItem(int selectionIndex) {
        configurator.removeMatcher(selectionIndex);
    }
}
